//
//  AdvertisingCell.m
//  HotWord
//
//  Created by Rainbow on 1/18/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "AdvertisingCell.h"
#define SUMMARY_LABEL_MAX_HEIGHT 30

@implementation AdvertisingCell
@synthesize adSummaryLabel;
@synthesize categoryLabel;
@synthesize timeLabel;
@synthesize advertising;

- (NSString *)reuseIdentifier
{
    return @"AdvertisingCell";
}

- (void)setAdvertisingForCell:(Advertising *)ad
{
    self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    self.advertising = ad;
    self.adSummaryLabel.text = self.advertising.summary;
    self.categoryLabel.text = self.advertising.category;
    self.timeLabel.text = [UtilHelper getUSDateByInterval:[self.advertising.createTime doubleValue]];
}

- (void)dealloc {
    [adSummaryLabel release];
    [advertising release];
    [categoryLabel release];
    [timeLabel release];
    [super dealloc];
}
@end
